package net.wexoo.onlinedivelog.reusable.validation.compound;

import net.wexoo.onlinedivelog.reusable.validation.AllowedCharactersValidator;
import net.wexoo.onlinedivelog.reusable.validation.NoWhiteSpaceValidator;

import org.apache.wicket.validation.CompoundValidator;
import org.apache.wicket.validation.validator.StringValidator;

public class UsernameValidator extends CompoundValidator<String> {

   private static final long serialVersionUID = 1L;

   public UsernameValidator() {
      add(StringValidator.lengthBetween(4, 20));
      add(new AllowedCharactersValidator());
      add(new NoWhiteSpaceValidator());
   }
}
